<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page import="com.hengpeng.itfinbase.message.partner.vo.UsrCardInfo" %>
<%@page import="com.hengpeng.common.util.StringHelper"%>
<%@include file="/page/common/public.jspf"%>
<!DOCTYPE HTML>
<html>
<head>
<meta charset=utf-8" />
<title>银行卡管理</title>
<link rel="stylesheet" type="text/css" href="${path}/css/base.css"/>
<link rel="stylesheet" type="text/css" href="${path}/css/layout.css"/>
<link href="${skin }/theme.css" rel="stylesheet" type="text/css" />
<link href="${skin }/member.css" rel="stylesheet" type="text/css" />
<script src="${path }/js/common/jquery1.10.2.min.js"></script>
<script src="${path }/js/common/helper.js?v=${v}"></script>
<script src="${path }/js/common/cookie.js?v=${v}"></script>
<script src="${path }/js/member/bindCard.js?v=${v}"></script>
<script src="${path }/js/member/open.js?v=${v}"></script>
<script src="${path }/js/member/userBankCard.js?v=${v}"></script>
</head>
<body>
        <!-- head -->
		<c:import url="../../include/top.jsp"></c:import>
		
    	<!--主体-->
        <div class="pageCenter registeredBox">
        	<div class="qyMsgBox">
        		<!--左边菜单  -->
            	<c:import url="../left.jsp"></c:import>
            	<!--左边菜单  -->
                <div class="qyMsgRight float_r">
                			<div class="auto_height" style="background: #fff;margin-bottom: 20px;">
								<div style="padding: 12px">
									<div class="hkjh_top_ul1_li1div1">银行卡管理</div>
								</div>
								<div class="auto_height" style="margin: 10px auto;padding: 12px;">
									<% 
										List<UsrCardInfo> usrCardInfolist = (List<UsrCardInfo>)request.getAttribute("UsrCardInfolist");
										if (usrCardInfolist != null && usrCardInfolist.size() > 0) {
											for (UsrCardInfo u : usrCardInfolist) {
									%>
										<div class="bank-bind-brief l">
							                <div class="bank-bind-logo">
									<% 
												if ("ICBC".equals(u.getBankId())) {
													out.println("<img alt=\"工商银行\" src=\"../images/bankLogo/ICBC.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
												} else if ("ABC".equals(u.getBankId())) {
													out.println("<img alt=\"农业银行\" src=\"../images/bankLogo/ABC.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
												} else if ("CMB".equals(u.getBankId())){
													out.println("<img alt=\"招商银行\" src=\"../images/bankLogo/CMB.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
												} else if ("CCB".equals(u.getBankId())){
													out.println("<img alt=\"建设银行\" src=\"../images/bankLogo/CCB.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
												} else if ("BCCB".equals(u.getBankId())){
													out.println("北京银行");
												} else if ("BJRCB".equals(u.getBankId())){
													out.println("北京农村商业银行");
												} else if ("BOC".equals(u.getBankId())){
													out.println("<img alt=\"中国银行\" src=\"../images/bankLogo/BOC.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("BOCOM".equals(u.getBankId())){
											 		out.println("<img alt=\"交通银行\" src=\"../images/bankLogo/COMM.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("CMBC".equals(u.getBankId())){
											 		out.println("<img alt=\"民生银行\" src=\"../images/bankLogo/CMBC.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("BOS".equals(u.getBankId())){
											 		out.println("<img alt=\"上海银行\" src=\"../images/bankLogo/shyh.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("CBHB".equals(u.getBankId())){
											 		out.println("渤海银行");
											 	} else if ("CEB".equals(u.getBankId())){
											 		out.println("<img alt=\"光大银行\" src=\"../images/bankLogo/CEBBANK.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("CIB".equals(u.getBankId())){
											 		out.println("<img alt=\"兴业银行\" src=\"../images/bankLogo/CIB.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("CITIC".equals(u.getBankId())){
											 		out.println("<img alt=\"中信银行\" src=\"../images/bankLogo/CITIC.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("CZB".equals(u.getBankId())){
											 		out.println("浙商银行");
											 	} else if ("GDB".equals(u.getBankId())){
											 		out.println("<img alt=\"广发银行\" src=\"../images/bankLogo/GDB.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("HKBEA".equals(u.getBankId())){
											 		out.println("东亚银行");
											 	} else if ("HXB".equals(u.getBankId())){
											 		out.println("<img alt=\"华夏银行\" src=\"../images/bankLogo/huaxia.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("HZCB".equals(u.getBankId())){
											 		out.println("杭州银行");
											 	} else if ("NJCB".equals(u.getBankId())){
											 		out.println("南京银行");
												} else if ("PINGAN".equals(u.getBankId())){
													out.println("<img alt=\"平安银行\" src=\"../images/bankLogo/SPABANK.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("PSBC".equals(u.getBankId())){
											 		out.println("<img alt=\"邮储银行\" src=\"../images/bankLogo/ZGYZ.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("SDB".equals(u.getBankId())){
											 		out.println("<img alt=\"深发银行\" src=\"../images/bankLogo/SDB.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("SPDB".equals(u.getBankId())){
											 		out.println("<img alt=\"浦发银行\" src=\"../images/bankLogo/SPDB.gif\" width=\"135\" height=\"40\" seed=\"bankBindLogo-iE201305MbbdOSL0f\" smartracker=\"on\">");
											 	} else if ("SRCB".equals(u.getBankId())) {
											 		out.println("上海农村商业银行");
											 	}
												
									%>
												<span class="card-type card-type-DC">储蓄卡</span>
							                    <span class="bank-bind-account"> 
							                    	**** **** ****
												    <% 
												    	if (!StringHelper.isEmpty(u.getCardId())) {
												    		if (u.getCardId().length() > 4) {
												    			out.println(u.getCardId().substring(u.getCardId().length() - 4, u.getCardId().length()));
												    		} else {
												    			out.println(u.getCardId());
												    		}
												    	}
												    %>
							                    </span>
												<div class="bank-bind-account" title="<%=u.getUsrName()%>"><%=u.getUsrName()%></div>
							               </div>
							               <div class="bank-bind-name">
							               		<div class="hotline">客服电话：4008009888</div>
							               </div>
										</div>
									<% 
											}
										}
									%>
									<c:forEach items="${userBankCardList}" var="card" varStatus="status">
									<div class="bank-bind-brief l">
							                <div class="bank-bind-logo">
							                    <img alt="${card.bankName.value}" src="${path}/images/bank/${card.bankName.value}.gif" width="127" height="27" seed="bankBindLogo-iE201305MbbdOSL0f" smartracker="on">
							                    <span class="card-type card-type-DC">储蓄卡</span>
							                    <span class="bank-bind-account">**** **** **** ${fn:substring(card.bankCardNo,fn:length(card.bankCardNo)-4,fn:length(card.bankCardNo))}  
							                    <a href="${path}/memberCenter/upBankCard/${card.id}.htm" class="d_blue" style="padding-left: 20px;">管理</a>
							                    <a href="javascript:void(0);" onclick="delBankCard('${card.id}')" class="d_blue" style="padding-left: 20px;">删除</a>
							                    
							                    </span>
													<div class="bank-bind-account" title="${card.realName}">${card.realName}</div>
							               </div>
							                <div class="bank-bind-name"><div class="hotline">客服电话：4008009888</div></div>
									</div>
									</c:forEach>
									<c:choose> 
									     <c:when test="${empty userInfo.trustAccountId and isTrust}">
									     	<div class="tixian_tip">很抱歉，您还没有开通汇付账户，暂时不能绑卡。现在就去开户吗？ <a href="javascript:void(0);" onclick="javascript:to_open();"> >>点我开户</a></div>
									     </c:when>
									     <c:otherwise>
									     	<div class="l" style="margin: 0 17px 0px 20px;">
												<div class="add-card J-add-card">
											       <a href="javascript:void(0);" onclick="bindCard()"><i class="iconfont">&#xF025;</i>添加银行卡</a>
											    </div>
											</div>
									     </c:otherwise>
									</c:choose>
							</div>
							<br />
							<br />
							<br />
							</div>
                </div>
                <div class="clear_both"></div> 
         	</div>       
        </div>
      
    	<!--主体-->
    	<!--foot-->
        <c:import url="../../include/foot.jsp"></c:import>
        <!--foot-->  
</body>
</html>

